package com.chenliang.demo.web;


import com.chenliang.demo.web.constants.CommonConstants;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;


/**
 * @program: bob
 * @description:
 * @author: chenLiang
 * @create: 2022-07-09 15:11
 */
@EnableDiscoveryClient
@SpringBootApplication
@ComponentScan(basePackages = {CommonConstants.DEMO_SCAN_BIZ,CommonConstants.DEMO_SCAN_WEB},
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE)})
public class DemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(DemoApplication.class, args);
        String value = run.getEnvironment().getProperty("chen");
        System.out.println(value);
    }
}
